 var table ,form ,laypage ,layer ,element ,laydate ,upload,index1 //时间组件
$(function(){
	// initProvinceById("/fpmsProvince/provinceList.do", "provinceCode", false);//加载省份
	 layui.use(['table','form','laypage','layer', 'element', 'laydate','upload'], function(){
         table = layui.table;
         form=layui.form;
         laypage = layui.laypage ;//分页
         layer = layui.layer ;//弹层
         element = layui.element; //元素操作
         laydate = layui.laydate; //时间组件 
         upload = layui.upload;
         var hid = getQueryString("id");
	        
    	$('#form_look').find("input ,select ,textarea").attr("disabled",true)
    	var questData = {"id": hid};
 	  	$.ajax({
	           url: "/loop/getOneLoop.do",               //请求地址
   	           type: "POST",              //请求类型
   	           data:formatParam(questData),              //请求数据
   	           timeout: 200000,                //请求超时时间(毫秒)
   	           headers: setHeader(),
   	           success:function(res){         //请求成功
   	        	   if(res.status == 200)
   	  				{
   	        		   	var num=res.resultData;
   	        		    $("#id").val(hid);  	        		    
   	    				$("#name").val(num.name); 	    				  	    				
   	    				$("#stationName").val(num.stationName); 
  	        		    $("#ct").val(num.ctZh);
  	        		    $("#type").val(num.typeZh);
  	        		    $("#current").val(num.current);
  	        		    $("#telemetering").val(num.telemeteringZh);
  	        		    $("#telesignalling").val(num.telesignallingZh);
 	 	        		$("#supplyCircuit").val(num.supplyCircuitZh);
 	 	        		$("#switchCabinetName").val(num.switchCabinetName); 
 	 	        		$("#collectorAddress").val(num.collectorAddress);
 	 	        		$("#serialNumber").val(num.serialNumber);
 	 	        		$("#itemType").val(num.itemTypeZh);
 	 	        		$("#voltageLevel").val(num.voltageLevelZh);
 	 	        		$("#detailedInformation").val(num.detailedInformationZh);
 	 	        		form.render();
 	 	        		if(num.detailedInformation==2){//详细
 	 	         		    $("#Informationform").show()
 	 	         		    $("#demandLimit").val(num.demandLimit);
 	 	        		    $("#generalCurrentLimit").val(num.generalCurrentLimit);
 	 	        		    $("#currentSevereLimit").val(num.currentSevereLimit);
 	 	        		    $("#generalUpperLimit").val(num.generalUpperLimit);
 	 	        		    $("#criticalUpperLimit").val(num.criticalUpperLimit);
 		 	        		$("#commonLowerLimit").val(num.commonLowerLimit);
 		 	        		$("#criticalLowerLimit").val(num.criticalLowerLimit);
 		 	        		$("#ratedCapacity").val(num.ratedCapacity);
 		 	        		$("#importantEquipment").val(num.importantEquipmentZh);
 		 	        		$("#alarm").val(num.alarmZh);
 		 	        		$("#send_wechat").val(num.sendWechatZh);
 		 	        		$("#twoTableMethod").val(num.twoTableMethodZh);
 		 	               form.render();
 		 	         	}else{
 		 	         		$("#Informationform").hide()
 		 	         	};	 	        		
 	    				$("#remarks").val(num.remarks);
   	    				form.render();
   	  				}else{          	  				    
   	  					layer.msg(res.resultMsg, {icon: res.icon});
   	  				}
   	  				      
                 }
              })
	});
})